<!Doctype html>

<head>
    <title>新闻</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, user-scalable=no" />
    <style>
        body {
            margin: 0;
        }
        #main {
            width: 100%;
        }
        .title {
            width: 100%;
            line-height: 40px;
            height: 40px;
            font-size: 20px;
            padding: 10px;
            text-align: center;
            background: rgb(54, 107, 255);
            color: #eee;
        }

        .content {
            padding: 20px;
        }
    </style>
</head>

<body>
    <div id="main">
        <div id="news-title" class="title">标题</div>
        <div id="news-content" class="content">内容</div>
    </div>
    <script>
    var json = {};
    document.getElementById("news-title").innerHTML = json.title;
    document.getElementById("news-content").innerHTML = json.content.replace(/\n/g, "<br/>");
    document.getElementsByTagName("title")[0].innerHTML = '新闻 - ' + json.title;
    </script>
</body>

</html>